package middleware

import (
	"server/framework/web/context"
)

func FlashResp(next HandleFunc) HandleFunc {
	return func(c *context.Context) {
		next(c)
		if c.SkipFlashResp {
			return
		}
		c.W.WriteHeader(c.RespStatus)
		_, _ = c.W.Write(c.RespData)
	}
}
